
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta charset="utf-8" />
    <title>stratified_plume_model.Model &#8212; Texas A&amp;M Oil spill / Outfall Calculator 2.1.0 documentation</title>
    <link rel="stylesheet" href="../../_static/alabaster.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    <script id="documentation_options" data-url_root="../../" src="../../_static/documentation_options.js"></script>
    <script src="../../_static/jquery.js"></script>
    <script src="../../_static/underscore.js"></script>
    <script src="../../_static/doctools.js"></script>
    <script src="../../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../../genindex.html" />
    <link rel="search" title="Search" href="../../search.html" />
    <link rel="next" title="stratified_plume_model.Model.load_sim" href="stratified_plume_model.Model.load_sim.html" />
    <link rel="prev" title="Overview of Stratified Plume Model Module" href="../../modules/spm.html" />
   
  <link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
  
  
  <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />

  </head><body>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          

          <div class="body" role="main">
            
  <div class="section" id="stratified-plume-model-model">
<h1>stratified_plume_model.Model<a class="headerlink" href="#stratified-plume-model-model" title="Permalink to this headline">¶</a></h1>
<dl class="class">
<dt id="stratified_plume_model.Model">
<em class="property">class </em><code class="sig-prename descclassname">stratified_plume_model.</code><code class="sig-name descname">Model</code><span class="sig-paren">(</span><em class="sig-param">profile=None</em>, <em class="sig-param">simfile=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/stratified_plume_model.html#Model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stratified_plume_model.Model" title="Permalink to this definition">¶</a></dt>
<dd><p>Master class object for controlling and post-processing the simulation</p>
<dl class="field-list">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><dl>
<dt><strong>profile</strong><span class="classifier"><cite>ambient.Profile</cite> object, default = None</span></dt><dd><p>An object containing the ambient CTD data and associated methods.
The netCDF dataset stored in the <cite>ambient.Profile</cite> object may be open
or closed at instantiation.  If open, the initializer will close the
file since this model does not support changing the ambient data once
initialized.</p>
</dd>
<dt><strong>simfile: str, default = None</strong></dt><dd><p>File name of a netCDF file containing the results of a previous
simulation run.</p>
</dd>
</dl>
</dd>
</dl>
<div class="admonition seealso">
<p class="admonition-title">See also</p>
<dl class="simple">
<dt><a class="reference internal" href="stratified_plume_model.Model.simulate.html#stratified_plume_model.Model.simulate" title="stratified_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>, <a class="reference internal" href="stratified_plume_model.Model.save_sim.html#stratified_plume_model.Model.save_sim" title="stratified_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>, <a class="reference internal" href="stratified_plume_model.Model.load_sim.html#stratified_plume_model.Model.load_sim" title="stratified_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>, <a class="reference internal" href="stratified_plume_model.plot_state_space.html#stratified_plume_model.plot_state_space" title="stratified_plume_model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>, <a class="reference internal" href="stratified_plume_model.plot_all_variables.html#stratified_plume_model.plot_all_variables" title="stratified_plume_model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a></dt><dd></dd>
</dl>
</div>
<dl class="field-list">
<dt class="field-odd">Attributes</dt>
<dd class="field-odd"><dl>
<dt><strong>profile</strong><span class="classifier"><cite>ambient.Profile</cite></span></dt><dd><p>Ambient CTD data</p>
</dd>
<dt><strong>got_profile</strong><span class="classifier">bool</span></dt><dd><p>Flag indicating whether or not the profile object was successfully
loaded into the <cite>Model</cite> object memory.    p : <cite>ModelParams</cite>
Container for the fixed model parameters</p>
</dd>
<dt><strong>sim_stored</strong><span class="classifier">bool</span></dt><dd><p>Flag indicating whether or not a simulation result is stored in the
object memory</p>
</dd>
<dt><strong>particles</strong><span class="classifier">list</span></dt><dd><p>List of <cite>dispersed_phases.PlumeParticle</cite> objects describing each
dispersed phase in the simulation</p>
</dd>
<dt><strong>K_T0</strong><span class="classifier">ndarray</span></dt><dd><p>Array of the initial values of K_T for each of the dispersed phase
particles.  Since this solution is iterative, heat transfer needs
to be re-initialized at the start of each iteration, and thus, it is
not sufficient to rely on the value of K_T stored inside the
<cite>particles</cite> list.</p>
</dd>
<dt><strong>R</strong><span class="classifier">float</span></dt><dd><p>Radius of the release point (m)</p>
</dd>
<dt><strong>maxit</strong><span class="classifier">float</span></dt><dd><p>Maximum number of iterations allowed in the interative solution</p>
</dd>
<dt><strong>toler</strong><span class="classifier">float</span></dt><dd><p>Relative error sufficient to consider the iterative solution to have
converged</p>
</dd>
<dt><strong>delta_z</strong><span class="classifier">float</span></dt><dd><p>Maximum step size to take in the storage of the simulation solution
(m)</p>
</dd>
<dt><strong>chem_names</strong><span class="classifier">list</span></dt><dd><p>List of chemical parameters to track for the dissolution</p>
</dd>
<dt><strong>zi</strong><span class="classifier">ndarray</span></dt><dd><p>Array of depths for the inner plume solution (m)</p>
</dd>
<dt><strong>yi</strong><span class="classifier">ndarray</span></dt><dd><p>Array of state space values computed for the inner plume solution</p>
</dd>
<dt><strong>zo</strong><span class="classifier">ndarray</span></dt><dd><p>Array of depths for the outer plume solution (m)</p>
</dd>
<dt><strong>yo</strong><span class="classifier">ndarray</span></dt><dd><p>Array of state space values computed for the outer plume solution</p>
</dd>
<dt><strong>yi_local</strong><span class="classifier"><cite>InnerPlume</cite> object</span></dt><dd><p>Object that translates the <cite>yi</cite> state space into the comprehensive
list of derived variables.</p>
</dd>
<dt><strong>yo_local</strong><span class="classifier"><cite>OuterPlume</cite> object</span></dt><dd><p>Object that translates the <cite>yo</cite> state space into the comprehensive
list of derived variables.</p>
</dd>
</dl>
</dd>
</dl>
<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.load_sim.html#stratified_plume_model.Model.load_sim" title="stratified_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>(self, fname)</p></td>
<td><p>Load in a saved simulation result file for post-processing</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.plot_all_variables.html#stratified_plume_model.Model.plot_all_variables" title="stratified_plume_model.Model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a>(self, fig)</p></td>
<td><p>Plot a comprehensive suite of simulation results</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.plot_state_space.html#stratified_plume_model.Model.plot_state_space" title="stratified_plume_model.Model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>(self, fig)</p></td>
<td><p>Plot the simulation state space</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.save_sim.html#stratified_plume_model.Model.save_sim" title="stratified_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>(self, fname, profile_path, profile_info)</p></td>
<td><p>Save the current simulation results</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.save_txt.html#stratified_plume_model.Model.save_txt" title="stratified_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_txt</span></code></a>(self, base_name, profile_path, …)</p></td>
<td><p>Save the state space in ascii text format for exporting</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.simulate.html#stratified_plume_model.Model.simulate" title="stratified_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>(self, particles, z, R[, maxit, …])</p></td>
<td><p>Simulate the plume dynamics from given initial conditions</p></td>
</tr>
</tbody>
</table>
<dl class="method">
<dt id="stratified_plume_model.Model.__init__">
<code class="sig-name descname">__init__</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">profile=None</em>, <em class="sig-param">simfile=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../_modules/stratified_plume_model.html#Model.__init__"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#stratified_plume_model.Model.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize self.  See help(type(self)) for accurate signature.</p>
</dd></dl>

<p class="rubric">Methods</p>
<table class="longtable docutils align-default">
<colgroup>
<col style="width: 10%" />
<col style="width: 90%" />
</colgroup>
<tbody>
<tr class="row-odd"><td><p><a class="reference internal" href="#stratified_plume_model.Model.__init__" title="stratified_plume_model.Model.__init__"><code class="xref py py-obj docutils literal notranslate"><span class="pre">__init__</span></code></a>(self[, profile, simfile])</p></td>
<td><p>Initialize self.</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.load_sim.html#stratified_plume_model.Model.load_sim" title="stratified_plume_model.Model.load_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">load_sim</span></code></a>(self, fname)</p></td>
<td><p>Load in a saved simulation result file for post-processing</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.plot_all_variables.html#stratified_plume_model.Model.plot_all_variables" title="stratified_plume_model.Model.plot_all_variables"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_all_variables</span></code></a>(self, fig)</p></td>
<td><p>Plot a comprehensive suite of simulation results</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.plot_state_space.html#stratified_plume_model.Model.plot_state_space" title="stratified_plume_model.Model.plot_state_space"><code class="xref py py-obj docutils literal notranslate"><span class="pre">plot_state_space</span></code></a>(self, fig)</p></td>
<td><p>Plot the simulation state space</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.save_sim.html#stratified_plume_model.Model.save_sim" title="stratified_plume_model.Model.save_sim"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_sim</span></code></a>(self, fname, profile_path, profile_info)</p></td>
<td><p>Save the current simulation results</p></td>
</tr>
<tr class="row-even"><td><p><a class="reference internal" href="stratified_plume_model.Model.save_txt.html#stratified_plume_model.Model.save_txt" title="stratified_plume_model.Model.save_txt"><code class="xref py py-obj docutils literal notranslate"><span class="pre">save_txt</span></code></a>(self, base_name, profile_path, …)</p></td>
<td><p>Save the state space in ascii text format for exporting</p></td>
</tr>
<tr class="row-odd"><td><p><a class="reference internal" href="stratified_plume_model.Model.simulate.html#stratified_plume_model.Model.simulate" title="stratified_plume_model.Model.simulate"><code class="xref py py-obj docutils literal notranslate"><span class="pre">simulate</span></code></a>(self, particles, z, R[, maxit, …])</p></td>
<td><p>Simulate the plume dynamics from given initial conditions</p></td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
          
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
<h1 class="logo"><a href="../../index.html">Texas A&M Oil spill / Outfall Calculator</a></h1>








<h3>Navigation</h3>
<ul class="current">
<li class="toctree-l1 current"><a class="reference internal" href="../../user_manual.html">TAMOC User Manual</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../unit_tests.html">Unit Tests</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../glossary.html">Glossary</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../bugs.html">Reporting Bugs</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../readme.html">Read Me File</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../release.html">Release Notes</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../license.html">License</a></li>
</ul>

<div class="relations">
<h3>Related Topics</h3>
<ul>
  <li><a href="../../index.html">Documentation overview</a><ul>
  <li><a href="../../user_manual.html">TAMOC User Manual</a><ul>
  <li><a href="../../modules/spm.html">Overview of Stratified Plume Model Module</a><ul>
      <li>Previous: <a href="../../modules/spm.html" title="previous chapter">Overview of Stratified Plume Model Module</a></li>
      <li>Next: <a href="stratified_plume_model.Model.load_sim.html" title="next chapter">stratified_plume_model.Model.load_sim</a></li>
  </ul></li>
  </ul></li>
  </ul></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
  <h3 id="searchlabel">Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" aria-labelledby="searchlabel" />
      <input type="submit" value="Go" />
    </form>
    </div>
</div>
<script>$('#searchbox').show(0);</script>








        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="footer">
      &copy;2020, Scott A. Socolofsky.
      
      |
      Powered by <a href="http://sphinx-doc.org/">Sphinx 2.4.4</a>
      &amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
      
      |
      <a href="../../_sources/autodoc/spm/stratified_plume_model.Model.rst.txt"
          rel="nofollow">Page source</a>
    </div>

    

    
  </body>
</html>